import React from "react";
import "./App.less";
// import router from "@/router/index"; //路径别名
import { Route, Routes } from "react-router-dom";
import Login from "./views/Login";
import { renderRoutes } from "@/router/utils";
import { mainRoutes } from "@/router/index";
import RequireAuth from "./guard/RequireAuth";
function App() {
  return (
    <div className="App">
      <Routes>
        <Route path="/" element={<RequireAuth />}>
          {renderRoutes(mainRoutes)}
        </Route>
        <Route path="/login" element={<Login />}></Route>
      </Routes>
    </div>
  );
}

export default App;
